module.exports = {
  runtimeCompiler: true,
  chainWebpack: config => {
    config.module
      .rule('vue')
      .use('vue-loader')
        .loader('vue-loader')
        .tap(options => {
          return options
        })
  },

  devServer: {
    port: 3001,     // 前端页面端口
    proxy: {
      '': {
        target: `http://localhost:${process.env.SERVER_PORT}`, // 端口从13031开始
        changeOrigin: true,
        ws: true,
        pathRewrite: {

        }
      }
    }
  },
  pluginOptions: {
    express: {
      shouldServeApp: true,
      serverDir: 'server'
    }
  }
}
